<?php

class DeX80 extends BaseLoDe
{

    function __construct()
    {
        $this->typeGame = Constant::GAME_DEx80_TYPE;
        $this->gameName = 'Đề X80';
        $this->rationMoney = 80;
    }

    public function calculateWinMoney($ketquaXoSo)
    {
        // 2 sá»‘ cuá»‘i con lÃ´ Ä‘áº·c biá»‡t
        $arrX80 = json_decode($ketquaXoSo->x80);
      //  echo '___'.var_dump($arrX80).'***';
      //  var_dump($this->arrChoices);
        $result=0;
        // Náº¿u trong cÃ¡c sá»‘ Ä‘Ã£ chá»�n, náº¿u sá»‘ báº±ng 2 sá»‘ cuá»‘i cá»§a lÃ´ Ä‘áº·c biá»‡t thÃ¬ tháº¯ng
        foreach ($this->arrChoices as $eachchoice){
        	//echo $arrX80[0].'zzzzzzzzzzz'.$eachchoice;
        	if ($arrX80[0]==$eachchoice)
        	{
        		$result+=$this->bet/count($this->arrChoices)*$this->rationMoney;
           	}
        }

        
        return $result;
    }

}

?>
